<?php
echo '<div id="CLMSG"></div>
<div id="CL">'; include('view/viewsender.php'); echo '</div>';


/*
// --- Print Board Requests
$panel['title'] = 'GestÃo de Clientes';
$panel['name'] = 'ClientPanel';
// Show Title
echo '<div id="PanelTitle" class="Line">' . $panel['title'] . ' | ';
mn_field('button', 'ED', 'card_request', 'Novo Cliente', '', '', '', '" onclick="
		modalwindow(\'Novo Cliente\',\'_newsender\',750,520);');
$QPrinter = $GLOBALS['MYT']->db_array("SELECT bnp_URL, bnp_Name, stt_Word AS bnp_Flag FROM bns_printersattrib
												INNER JOIN bns_printers ON cpr_Printer = bnp_ID
												INNER JOIN hd_sysstatus ON stt_Sistema = 20 AND sttFlag = bnp_Flag
												WHERE cpr_POrigen = {$_SESSION[$SESSOF]}");
for ($p = 1; $p <= $QPrinter[0]; $p++) {
    echo ' | ' . $QPrinter[$p]['bnp_Name'] . ' Estado: <font color="FF0000"><b>' . $QPrinter[$p]['bnp_Flag'] . '</b></font> | ';
    mn_field('button', 'ED', 'Print_Order', 'Executar', '', '', '', '');
    echo '<div src="' . $QPrinter[$p]['bnp_URL'] . '"></div>';
}
echo '</div>';
//  Make Panel
echo '<div id="' . $panel['name'] . '"></div>
	<div id="Action1Body" class="Line"></div>';
$RSGET = $GLOBALS['MYT']->db_array("SELECT *
						 FROM clientes
						WHERE DATE(CliFechaAlta) = '" . date("Y-m-d") . "'");
$CARD = $RSGET[0];
?>
<script charset="utf-8" type="text/javascript">
    disableSelection(document.getElementById("<?php echo $panel['name']; ?>"));

    Ext.onReady(function(){

        $elem = 200;
        var  windowWidth = 0, windowHeight = 0;
        if( typeof( window.innerWidth ) == 'number' ) {
            windowWidth = window.innerWidth
            windowHeight = window.innerHeight-$elem;
        } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
            windowWidth = document.documentElement.clientWidth;
            windowHeight = document.documentElement.clientHeight-$elem;
        }

        Ext.QuickTips.init();

        var myData = [
<?php
for ($i = 1; $i <= $CARD; $i++) {
    echo '[' . $i . ',' . $RSGET[$i]['O_ID'] . ',\'' . $RSGET[$i]['COL1'] . '\',\'' . $RSGET[$i]['COL2'] . '\',\'' . $RSGET[$i]['COL3'] . '\',\'' . $RSGET[$i]['COL4'] . '\',\'' . $RSGET[$i]['COL5'] . '\',\'' . $RSGET[$i]['COL6'] . '\']';
    if ($i < $CARD) {
        echo ',';
    }
}
?>
            ];

            var ds = new Ext.data.Store({
                reader: new Ext.data.ArrayReader({}, [
                    {name: 'id'},
                    {name: 'O_ID', type: 'int'},
                    {name: 'COL1', type: 'string'},
                    {name: 'COL2', type: 'string'},
                    {name: 'COL3', type: 'string'},
                    {name: 'COL4', type: 'string'},
                    {name: 'COL5', type: 'string'},
                    {name: 'COL6', type: 'string'},
                ])
            });
            ds.loadData(myData);
            var colModel = new Ext.grid.ColumnModel([
                {header: "Numero", width: 80, sortable: true, locked:true, dataIndex: 'O_ID'},
                {header: "Nome", width: 200, sortable: true, locked:true, dataIndex: 'COL1'},
                {header: "Loja", width: 150, sortable: true, dataIndex: 'COL2'},
                {header: "Cliente", width: 150, sortable: true, locked:true,dataIndex: 'COL3'},
                {header: "Data", width: 120, sortable: true, locked:true,dataIndex: 'COL4'},
                {header: "Funcionario", width: 120, sortable: true, locked:true,dataIndex: 'COL5'},
                {header: "Classe", width: 75, sortable: true, locked:true,dataIndex: 'COL6'}
            ]);

            var selmode = new Ext.grid.RowSelectionModel({});
            var Console = new Ext.Panel({
                loadMask: true,
                items: [{
                        columnWidth: 0.6,
                        layout: 'fit',
                        items: {
                            xtype: 'grid',
                            ds: ds,
                            cm: colModel,
                            sm: selmode,
                            loadMask: {
                                msg : 'Loading...'
                            },
                            listeners: {
                                rowdblclick: function(ds, row) {
                                    var record = ds.getStore().getAt(row);
                                    var value = record.get('O_ID');
                                    ShowProp(value);
                                }
                            },
                            width: 500,
                            height: windowHeight,
                            border: true
                        }
                    }],
                renderTo: '<?php echo $panel['name']; ?>'
            });

        });
</script>*/
